package com.hm.service.config.db.ds2;

import com.alibaba.druid.pool.DruidDataSource;
import com.hm.service.config.constant.DBConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import java.util.HashMap;

/**
 * hm
 * 数据源
 */
public class DataSource2 extends DruidDataSource {

    @Autowired
    @Qualifier("Database2")
    public HashMap<String, String> Database2Map;

    public DataSource2() {
        String url = DBConfig.ds2.get("url");
        String Username = DBConfig.ds2.get("Username");
        String Password = DBConfig.ds2.get("Password");
        String DriverClassName = DBConfig.ds2.get("DriverClassName");
        setUrl(url);
        setUsername(Username);
        setPassword(Password);
        setDriverClassName(DriverClassName);
    }
}
